<?php
namespace Model;
use Think\Model;

//预约
class BookModel extends Model {
    //提交订单
    public function get_data_order_submit ($skill_id) {
	 $sql = "SELECT 
	    skill_id,  skill_img_name_small0, 
	    skill_title,  skill_price,  user_school, skill_unit, skill_describe, skill_time_quantum,

	    user_id

	    FROM
	    wx_skill_share,wx_user

	    WHERE "."skill_id = $skill_id and ".
	    "wx_skill_share.skill_user = wx_user.user_account
	    ;";
	 
	 
//	    dump($sql);exit;
	    $Model = new Model(); // 实例化一个model对象 没有对应任何数据表
//	    exit;
	    $info = $Model->query($sql);
//	    dump($info);exit;
	    return $info;
	
    }
    
    //获得用户地址
    public function get_data_user_address($user_account) {
	  $sql = "SELECT
	      
	    address_school, address_detail, address_tel, address_user_name, address_user_sex

	    FROM
	    wx_user_address_detail, wx_user_address_list

	    WHERE "."user_account = $user_account and ".
	    "wx_user_address_list.user_address0 = wx_user_address_detail.address_id
	    ;";
	 
	    
//	    dump($sql);exit;
	    $Model = new Model(); // 实例化一个model对象 没有对应任何数据表
//	    exit;
	    $info = $Model->query($sql);
//	    dump($info);exit;
	    return $info;
	
    }
    
	    
}